From bf86da9df0fc8297b2b6e6c7ac14c54b9023f6da Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 15 Mar 2004 23:56:44 +0000 Subject: [PATCH] Block the ::changed handler during the emission of ::match-selected. Tue Mar 16 00:56:11 2004 Matthias Clasen * gtk/gtkentrycompletion.c (gtk_entry_completion_list_button_press): Block the ::changed handler during the emission of ::match-selected. Partial fix for #137226. * gtk/gtkfilechooserentry.c: Remove the no longer needed no_pop_down flag. --- ChangeLog | 14 ++++++++++++++ ChangeLog.pre-2-10 | 14 ++++++++++++++ ChangeLog.pre-2-4 | 14 ++++++++++++++ ChangeLog.pre-2-6 | 14 ++++++++++++++ ChangeLog.pre-2-8 | 14 ++++++++++++++ gtk/gtkentrycompletion.c | 4 ++++ gtk/gtkfilechooserentry.c | 10 ---------- 7 files changed, 74 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 03c3bc2b9f..9cfed65a76 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +Tue Mar 16 00:56:11 2004 Matthias Clasen + + * gtk/gtkentrycompletion.c (gtk_entry_completion_list_button_press): + Block the ::changed handler during the emission of ::match-selected. + Partial fix for #137226. + + * gtk/gtkfilechooserentry.c: Remove the no longer needed + no_pop_down flag. + +Tue Mar 16 00:20:51 2004 Matthias Clasen + + * gtk/gtkfilechooserwidget.c (gtk_file_chooser_widget_new_with_backend): + Fix a typo in the docs. + 2004-03-15 Tor Lillqvist * README.win32: Updates. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 03c3bc2b9f..9cfed65a76 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,17 @@ +Tue Mar 16 00:56:11 2004 Matthias Clasen + + * gtk/gtkentrycompletion.c (gtk_entry_completion_list_button_press): + Block the ::changed handler during the emission of ::match-selected. + Partial fix for #137226. + + * gtk/gtkfilechooserentry.c: Remove the no longer needed + no_pop_down flag. + +Tue Mar 16 00:20:51 2004 Matthias Clasen + + * gtk/gtkfilechooserwidget.c (gtk_file_chooser_widget_new_with_backend): + Fix a typo in the docs. + 2004-03-15 Tor Lillqvist * README.win32: Updates. diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 03c3bc2b9f..9cfed65a76 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,17 @@ +Tue Mar 16 00:56:11 2004 Matthias Clasen + + * gtk/gtkentrycompletion.c (gtk_entry_completion_list_button_press): + Block the ::changed handler during the emission of ::match-selected. + Partial fix for #137226. + + * gtk/gtkfilechooserentry.c: Remove the no longer needed + no_pop_down flag. + +Tue Mar 16 00:20:51 2004 Matthias Clasen + + * gtk/gtkfilechooserwidget.c (gtk_file_chooser_widget_new_with_backend): + Fix a typo in the docs. + 2004-03-15 Tor Lillqvist * README.win32: Updates. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 03c3bc2b9f..9cfed65a76 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,17 @@ +Tue Mar 16 00:56:11 2004 Matthias Clasen + + * gtk/gtkentrycompletion.c (gtk_entry_completion_list_button_press): + Block the ::changed handler during the emission of ::match-selected. + Partial fix for #137226. + + * gtk/gtkfilechooserentry.c: Remove the no longer needed + no_pop_down flag. + +Tue Mar 16 00:20:51 2004 Matthias Clasen + + * gtk/gtkfilechooserwidget.c (gtk_file_chooser_widget_new_with_backend): + Fix a typo in the docs. + 2004-03-15 Tor Lillqvist * README.win32: Updates. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 03c3bc2b9f..9cfed65a76 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,17 @@ +Tue Mar 16 00:56:11 2004 Matthias Clasen + + * gtk/gtkentrycompletion.c (gtk_entry_completion_list_button_press): + Block the ::changed handler during the emission of ::match-selected. + Partial fix for #137226. + + * gtk/gtkfilechooserentry.c: Remove the no longer needed + no_pop_down flag. + +Tue Mar 16 00:20:51 2004 Matthias Clasen + + * gtk/gtkfilechooserwidget.c (gtk_file_chooser_widget_new_with_backend): + Fix a typo in the docs. + 2004-03-15 Tor Lillqvist * README.win32: Updates. diff --git a/gtk/gtkentrycompletion.c b/gtk/gtkentrycompletion.c index 0ca623ac2a..6cdc07584e 100644 --- a/gtk/gtkentrycompletion.c +++ b/gtk/gtkentrycompletion.c @@ -627,9 +627,13 @@ gtk_entry_completion_list_button_press (GtkWidget *widget, &iter, path); gtk_tree_path_free (path); + g_signal_handler_block (completion->priv->entry, + completion->priv->changed_id); g_signal_emit (completion, entry_completion_signals[MATCH_SELECTED], 0, GTK_TREE_MODEL (completion->priv->filter_model), &iter, &entry_set); + g_signal_handler_unblock (completion->priv->entry, + completion->priv->changed_id); if (!entry_set) { diff --git a/gtk/gtkfilechooserentry.c b/gtk/gtkfilechooserentry.c index 87be48ab52..b967ea011c 100644 --- a/gtk/gtkfilechooserentry.c +++ b/gtk/gtkfilechooserentry.c @@ -56,7 +56,6 @@ struct _GtkFileChooserEntry guint has_completion : 1; guint in_change : 1; - guint no_pop_down : 1; }; enum @@ -266,10 +265,6 @@ match_selected_callback (GtkEntryCompletion *completion, gtk_file_path_free (path); g_free (display_name); - /* We surpress the completion for a second. It's confusing to click on an - * entry and have it pop back up immediately */ - chooser_entry->no_pop_down = TRUE; - return TRUE; } @@ -296,10 +291,6 @@ completion_match_func (GtkEntryCompletion *comp, return FALSE; } - /* If this is set, than someone is surpressing the popdown temporarily */ - if (chooser_entry->no_pop_down) - return FALSE; - gtk_tree_model_get (GTK_TREE_MODEL (chooser_entry->completion_store), iter, DISPLAY_NAME_COLUMN, &name, -1); if (!name) { @@ -772,7 +763,6 @@ clear_completion_callback (GtkFileChooserEntry *chooser_entry, chooser_entry->has_completion = FALSE; gtk_file_chooser_entry_changed (GTK_EDITABLE (chooser_entry)); } - chooser_entry->no_pop_down = FALSE; } /** -- 2.30.2